<extend name="Public/base" />

<block name="body">
<link rel="stylesheet" type="text/css" href="__CSS__/admin_table.css" media="all">
<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
    <div class="main-title cf">
        <h2>新增 [发送通知]</h2>
    </div>
    <!-- 标签页导航 -->
<div class="tab-wrap">
    <ul class="tab-nav nav">
        <li data-tab="tab1" class="current"><a href="javascript:void(0);">基础</a></li>
    </ul>
    <div class="tab-content zc_for">
    <!-- 表单 -->
    <form id="form" action="{:U('add_list?model='.$model['id'])}" method="post" class="form-horizontal">
        <!-- 基础 -->
        <div id="tab1" class="tab-pane in tab1">
    		<table  border="0" cellspacing="0" cellpadding="0">
                <tbody>
                 <tr>
                    <td class="l">应用名称：</td>
                    <td class="r" >
                       <select  name="push_id">
                      <option value="">请选择应用</option>
                       <volist name=":get_push_list()" id="vo">
                        <option value="{$vo.id}">{$vo.push_name}</option>
                       </volist>
                       </select>
                       <input type="hidden" id="game_name" name="game_name" value=""></input>
                    </td>
                  </tr>
                  <tr>
                    <td class="l">推送内容：</td>
                    <td class="r" colspan='3'>
                        <textarea name="content" class="txt_area2"></textarea>
                    </td>
                      <tr>
                    <td class="l">推送对象：</td>
                    <td class="r">
                        <label class="inp_radio">
                            <input type="radio" class="inp_radio" value="0" name="push_object" checked="ture" >不限
                            <input type="radio" class="inp_radio" value="1" name="push_object" >IOS
                            <input type="radio" class="inp_radio" value="2" name="push_object" >安卓
                            <input type="radio" class="inp_radio" value="3" name="push_object" >WinPhone
                        </label>
                    </td>
                  </tr>
                  </tr>
                      <tr>
                    <td class="l">推送时间：</td>
                    <td class="r" colspan='3'>
                    <input type="radio" class="inp_radio" id="push_time_type" value="0" name="push_time_type" checked="checked" >立即
                    <input type="radio" class="inp_radio" id="push_time_type" value="1" name="push_time_type" >定时
                    </td>
                  </tr>
                      <tr id="dtime">
                    <td class="l">定时时间：</td>
                    <td class="r" colspan='3'>
                        <input type="text" class="txt time" name="push_time" id="push_time" value="" placeholder="请选择时间">
                        <input type="hidden" class="txt time" name="create_time"  value="{:time()}" >
                    </td>
                  </tr>

                </tbody>
            </table>
        </div>
        <div class="form-item cf">
            <button class="btn submit-btn ajax-post hidden" id="submit" type="submit" target-form="form-horizontal">确 定</button>
            <a class="btn btn-return" href="javascript:history.back(-1);">返 回</a>
        </div>
    </form>
    </div>
</div>
</block>

<block name="script">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';</php>
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script><script type="text/javascript">
//导航高亮
highlight_subnav('{:U('Opentype/lists')}');
$('#submit').click(function(){
    $('#form').submit();
});

$(function(){
var push_time_type=$("#push_time_type:checked").val();
if(push_time_type==0){
$("#dtime").hide();
$("#push_time").val("{:time()}");

}

$(".inp_radio[name='push_time_type']").change(function() {
 if($(this).val()==0){
    $("#dtime").hide();
    $("#push_time").val("{:time()}");
    }else{
      $("#dtime").show();
       $("#push_time").val("");
    }
});
    $('.time').datetimepicker({
    language:"zh-CN",
     hour: 13,
       minute: 15
    });
    showTab();

});
</script>
</block>
